<?php
namespace App\Controllers\Common;
use \App\Libs\Base\Constant;
use \App\Libs\DB\PailePdo as Pdo;

class Version extends \App\Libs\Base\BaseAction
{
	 protected function beforeRun() {
		parent::beforeRun();
        //$this->needSignatrue = true;
    }
    public function execute() {
		//所有的配置
		$os = $this->request->get('os');
		$res = [];
		if( $os == 'android' ){
			$res = Pdo::find('select * from t_paile_system_update where type = 0 order by ctime limit 1');
		}else if( $os == 'iphone' ){
			$res = Pdo::find('select * from t_paile_system_update where type = 1 order by ctime limit 1');
		}
		
        return \App\Libs\Views\Json::view(0, '返回成功', $res);

    }
}
